﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Blueprint.Mobile
{
    class ApplicationManager
    {
        public static readonly ApplicationManager Instance = new ApplicationManager();
        private ApplicationManager() { }

        private Dictionary<string, IController> controllersCache = new Dictionary<string, IController>();

        public MainForm GetMainForm()
        {
            if(!controllersCache.ContainsKey("Main"))
                controllersCache.Add("Main", new MainController(new MainForm()));
            return controllersCache["Main"].View as MainForm;
        }
    }
}
